package com.deer.wms.system.manage.service;

import com.deer.wms.project.root.service.SuperService;
import com.deer.wms.system.manage.model.organization.UserOrganization;
import com.deer.wms.system.manage.model.organization.UserOrganizationCriteria;
import com.deer.wms.system.manage.model.organization.UserOrganizationDto;

import java.util.List;


/**
 *
 * @author guo
 * @since 2019/11/05
 */
public interface UserOrganizationService extends SuperService<UserOrganization> {
    /**
     * 按照criteria条件查询对应的数据
     * @param criteria criteria
     * @return List<UserOrganizationDto>
     */
    List<UserOrganizationDto> findList(UserOrganizationCriteria criteria) ;

    /**
     * 依据用户ID和货主ID新增数据
     * @param userId 用户ID
     * @param organizationId 货主ID
     */
    void addUserOrganization(Integer userId, Integer organizationId);

    /**
     * 依据用户ID删除对应的数据
     * @param userId 用户ID
     */
    void deleteByUserId(Integer userId);

    /**
     * 依据货主ID删除对应的数据
     * @param organizationId 货主ID
     */
    void deleteByOrganizationId(Integer organizationId);
}
